﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DigitalSolutionLibrary.Security;
using DigitalSolutionLibrary.Utilities;

namespace DigitalSolutionManagement
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnMD5_Click(object sender, EventArgs e)
        {
            string md5 = HashMD5.CreateMD5(txtSource.Text);
            txtMD5.Text = md5;
        }

        private void btnEncrypt_Click(object sender, EventArgs e)
        {
            string encrypt = TripleDES.Encryption(txtSource.Text);
            txtEncrypt.Text = encrypt;
        }

        private void btnDecrypt_Click(object sender, EventArgs e)
        {
            string decrypt = TripleDES.Decryption(txtEncrypt.Text);
            txtDescrypt.Text = decrypt;
        }

        private void btnRead_Click(object sender, EventArgs e)
        {
            string rs = Utility.ReadMoney(long.Parse(txtMoney.Text));
            txtTextMoney.Text = rs;
        }
    }
}
